home *** CD-ROM | disk | FTP | other *** search
Makefile | 1992-08-05 | 4.9 KB | 133 lines |
- # Makefile for pbmplus tools.
- #
- # Copyright (C) 1989, 1991 by Jef Poskanzer.
- #
- # Permission to use, copy, modify, and distribute this software and its
- # documentation for any purpose and without fee is hereby granted, provided
- # that the above copyright notice appear in all copies and that both that
- # copyright notice and this permission notice appear in supporting
- # documentation. This software is provided "as is" without express or
- # implied warranty.
-
- # CONFIGURE: gcc makes things go faster on some machines, but not everyone
- # has it. Warning: do not use gcc's -finline-functions or -fstrength-reduce
- # flags, they can produce incorrect code. (This is with gcc versions 1.35,
- # 1.36, and 1.37, later versions may fix these bugs.) Also, on some systems
- # gcc can't compile pnmconvol - dunno why. And on some systems you can't
- # use the -ansi flag, it gives compilation errors in <math.h>.
- CC = icc
-
- # CONFIGURE: cc flags go here.
- CFLAGS = -Sm -D__STDC__ -Q -Ti -Gd
-
- # CONFIGURE: ld flags go here. Eunice users may want to use -noshare so that
- # the binaries can run standalone.
- LDFLAGS = /PM:VIO
-
- # CONFIGURE: If you have an X11-style rgb color names file, define its
- # path here. This is used by PPM to parse color names into rgb values.
- # If you don't have such a file, comment this out and use the alternative
- # hex and decimal forms to specify colors (see ppm/pgmtoppm.1 for details).
- #RGBDEF = -DRGB_DB=\"/usr/lib/X11/rgb\"
-
- # CONFIGURE: Library file extension
- #LIBEXT = .a
- LIBEXT = .dll
-
- # CONFIGURE: Any additional libraries
- LIBS = /nod dde4sbso
-
- # CONFIGURE: Object file extension
- #OBJ = .o
- OBJ = .obj
-
- # CONFIGURE: Executable file extension
- #EXE =
- EXE = .exe
-
- # CONFIGURE: PBMPLUS's support for TIFF files depends on the library from
- # Sam Leffler's TIFF Software package - see the OTHER.SYSTEMS file for a
- # full description and access information. To configure PBMPLUS to use the
- # library: first, if necessary, fetch the TIFF Software, unpack it in a
- # scratch directory somewhere, and move the libtiff subdirectory right here
- # into the PBMPLUS top-level directory. Configure and "make" in the
- # libtiff directory. Yes, you do have to do the TIFF make by hand, the
- # general PBMPLUS make will *not* make libtiff. Finally, uncomment the
- # following five definitions.
- #
- # Libtiff is pretty good about portability, but there are some machines
- # it has problems on. If you run into problems, you may wish to contact
- # Sam directly, at the address listed in the OTHER.SYSTEMS file.
- #
- # By the way, you must have at least version 2.4 of libtiff. Earlier
- # versions will not work.
- TIFFDEF = -DLIBTIFF
- TIFFINC = -I../libtiff
- TIFFLIB = ../libtiff/libtiff$(LIBEXT)
- TIFFBINARIES = tifftopnm$(EXE) pnmtotiff$(EXE)
- TIFFOBJECTS = tifftopnm$(OBJ) pnmtotiff$(OBJ)
-
- # CONFIGURE: Define the directory that you want the binaries copied to.
- # If you need scripts and binaries to be in different directories, you
- # can set that up too.
- INSTALLBINARIES = /pbmplus
- INSTALLSCRIPTS = $(INSTALLBINARIES)
-
- # CONFIGURE: Define the directories that you want the manual sources copied to,
- # plus the suffix you want them to have.
- INSTALLMANUALS1 = /pbmplus
- SUFFIXMANUALS1 = n
- INSTALLMANUALS3 = /pbmplus
- SUFFIXMANUALS3 = n
- INSTALLMANUALS5 = /pbmplus
- SUFFIXMANUALS5 = n
-
- # CONFIGURE: Normally the man pages are installed using "cp". By changing
- # this define you can use something else, for example a script that calls
- # compress or pack.
- MANCP = rem
-
- # CONFIGURE: Your Shell.
- #SHELL = sh
- SHELL = cmd
-
- # CONFIGURE: Command to remove or delete a file
- #REMOVE = -rm
- REMOVE = del
-
- # CONFIGURE: Library command
- #LIBBIN = ar rc
- LIBBIN = lib
-
- # CONFIGURE: Normally the Makefiles build and install separate binaries for
- # each program. However, on some systems (especially those without shared
- # libraries) this can mean a lot of space. In this case you might try
- # building a "merge" instead. The idea here is to link all the binaries
- # together into one huge executable, with a tiny dispatch program as the
- # main. Then the merged binary is installed with file-system links for
- # each program it includes. The dispatch routine can tell which program
- # to run by looking at argv[0]. On a Sun3 under SunOS 3.5 the space for
- # executables went from 2.9 meg to .36 meg.
- #
- # Note that if you make a "merge", the executables don't get created
- # until you do the install.
-
- all: pbmcrt.dll binaries
-
- # End of configurable definitions.
-
- SUBDIRS = pbm pgm pnm ppm
-
- binaries: makefile
- for %%f in ($(SUBDIRS)) do (echo %%f & cd \pbmplus10dec91\%%f & $(MAKE) \
- $(MFLAGS) CC=$(CC) "CFLAGS=$(CFLAGS)" RGBDEF=$(RGBDEF) \
- TIFFDEF=$(TIFFDEF) TIFFINC=$(TIFFINC) "LDFLAGS=$(LDFLAGS)" \
- MANCP=$(MANCP) SHELL=$(SHELL) REMOVE=$(REMOVE) LIBBIN=$(LIBBIN) \
- LIBEXT=$(LIBEXT) "LIBS=$(LIBS)" OBJ=$(OBJ) EXE=$(EXE) all)
-
- pbmcrt.dll: pbmcrt.obj pbmcrt.def
- link386 pbmcrt.obj, $@,,, pbmcrt
-
- pbmcrt.obj: pbmcrt.c
- $(CC) -c -Ge- -Q -Sm -Ti $*.c
-